ts=0.2;
n=-10:10;
nts=n*ts;
xn=sin(2*pi*nts)+3*cos(4*pi*nts);
t=-2:0.01:2;
x=sin(2*pi*t)+3*cos(4*pi*t);
plot(t,x,'r','linewidth',2),hold on;
stem(nts,xn),grid on;
axis([-2.5 2.5 -5 5]);

